package player;

import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.ImageIcon;
/**
* Clase listener3 que permite que el avion del jugador dispare y utilize nukes implementando la interfaz KeyListener.
*/
public class listener3 implements KeyListener{
	private player jugador;
	public listener3(player p){
		jugador=p;
	}
	public void keyPressed(KeyEvent arg0) {
		switch(arg0.getKeyCode()) {
		case KeyEvent.VK_A: {
			jugador.setshoot(true);
			break;
		}
		
			
		}
		
		
	}

	@Override
	public void keyReleased(KeyEvent arg0) {
		switch(arg0.getKeyCode()) {
		case KeyEvent.VK_A: {
			
			jugador.setshoot(false);
			break;
		}
		case KeyEvent.VK_S: {
			jugador.usarnuke();
			break;
		}
			
		}
	
	}

	@Override
	public void keyTyped(KeyEvent arg0) {
		
		
	}
}